﻿
namespace Unity.Per.Common {

    public enum BaseModulePriority
    { 
        High,
        Middle,
        Low,
    }

    public interface IBaseModule:IDoLifeCycle
    {

        string ModuleName { get; set; }

        IBaseModule FatherModule { get; set; }

        bool IsModuleInit { get; set; }
        
        bool IsModuleStarted { get; set; }

        bool IsMono { get;}

        bool IsEffectGameObject { get; set; }

        BaseModulePriority Priority { get; set; }

        T GetSubModule<T>() where T : IBaseModule;

        T GetFatherModule<T>() where T : IBaseModule;


        //void OnModuleInit();
        //void OnModuleDestroy();


        //void OnModuleStart();
        //void OnModuleStop();

        //void OnModuleUpdate();
        //void OnModuleLateUpdate();

        //void OnModuleResume();
        //void OnModuleSuspend();


        //void OnModuleEndOfFrame();

        void AddModule(IBaseModule Module, bool isEffectGameObject = true, BaseModulePriority priority = BaseModulePriority.Middle);

        void RemoveModule(IBaseModule Module);

        void RemoveAllModule();

    }
}
